home *** CD-ROM | disk | FTP | other *** search
-
- /*
- There may be additional include files required depending
- upon the compile product you are using. Typical compilers
- include Microsoft C by Microsoft or Turbo C by Boland Int'l.
- */
- #include <stdio.h>
- main()
- {
- int zx=100;
-
- /* zx = 100 */
- mod(&zx);
- /* zx = 200 */
- printf("zx is %d\n",zx);
-
- }
-
- mod(a)
- int *a;
- {
- /* 'a' is now the address of 'zx' */
- /* '*a' is the contents of 'zx' */
-
- printf("contents before: %d\n",*a);
- *a += 100;
- printf("contents after: %d\n",*a);
-
- }
-